package com.kiliter.exception;

import com.kiliter.enums.ErrorEnum;
import lombok.Getter;

/**
 * @ClassName zhangjl
 *
 * @date 2021/6/1 14:21 @Version 1.0
 */
@Getter
public class KiliterException extends RuntimeException {
  private static final Long serialVersionUID = 6370710256089347961L;

  private final Integer code;

  public KiliterException(ErrorEnum errorEnum) {
    super(errorEnum.getMessage());
    this.code = errorEnum.getCode();
  }

  public KiliterException(Integer code, String message) {
    super(message);
    this.code = code;
  }
}
